﻿<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="PersonFormControl.ascx.cs"
    Inherits="TeamTime.PersonFormControl" %>
<%@ Register Src="LabelWithTimedMsg.ascx" TagName="LabelWithTimedMsg" TagPrefix="uc1" %>
<asp:TextBox ID="txtCompanyID" runat="server" Visible="false"></asp:TextBox>
<asp:CheckBox ID="chkSuccessfullySaved" runat="server" Visible="false"></asp:CheckBox>
<asp:Panel runat="server" ID="Panel1">
    <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" AutoPostBack="false">
        <ajaxToolkit:TabPanel ID="TabPanel1" runat="server" HeaderText="Details">
            <ContentTemplate>
                <asp:Panel ID="pnlDetails" runat="server" DefaultButton="btnSave">
                    <table id="tbl1" cellspacing="0" width="">
                        <tr id="trID" runat="server">
                            <td runat="server">
                                ID
                            </td>
                            <td runat="server">
                                <asp:TextBox ID="txtID" runat="server" BackColor="#E0E0E0" BorderStyle="None" ReadOnly="True"></asp:TextBox>&nbsp;
                                <asp:LinkButton ID="lnkLoadDup" runat="server" CausesValidation="False" OnClick="lnkLoadDup_Click"
                                    Visible="False">This Person already exists.  Click to Load.</asp:LinkButton>&nbsp;&nbsp;&nbsp;
                                <asp:HyperLink ID="hypContactRecs" runat="server" Target="_blank">View Contact Records</asp:HyperLink>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                First Name
                            </td>
                            <td>
                                <asp:TextBox ID="txtFirstName" runat="server" MaxLength="200" ReadOnly="True" Width="300px"></asp:TextBox><asp:RequiredFieldValidator
                                    ID="reqValFirstName" runat="server" ControlToValidate="txtFirstName" Display="Dynamic"
                                    ErrorMessage="* Required" ValidationGroup="popup22"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Surname
                            </td>
                            <td>
                                <asp:TextBox ID="txtSurname" runat="server" MaxLength="200" ReadOnly="True" Width="300px"></asp:TextBox><asp:RequiredFieldValidator
                                    ID="reqValSurname" runat="server" ControlToValidate="txtSurname" Display="Dynamic"
                                    ErrorMessage="* Required" ValidationGroup="popup22"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                ID Number
                            </td>
                            <td>
                                <asp:TextBox ID="txtIDNumber" runat="server" MaxLength="50" ReadOnly="True" Width="150px"></asp:TextBox><asp:RequiredFieldValidator
                                    ID="reqValIDNumber" runat="server" ControlToValidate="txtIDNumber" Display="Dynamic"
                                    ErrorMessage="* Required" ValidationGroup="popup22"></asp:RequiredFieldValidator>&nbsp;<asp:Label
                                        ID="lblIDNumInvalid" runat="server" ForeColor="Red" Text="Please enter a valid S.A. ID number"
                                        Visible="False"></asp:Label>&nbsp;&nbsp;&nbsp; Date of Birth&nbsp;&nbsp;
                                <clib:TextBoxCalendar ID="calDateOfBirth" runat="server" ClearText="" ErrorMessage="* Required"
                                    Required="True" ValidationGroup="popup22" DateFormat="yyyy/MM/dd" MaximumValue="2999-01-01"
                                    MinimumValue="1900-01-01" ReadOnly="False" Text="" Width="80px">
                                </clib:TextBoxCalendar>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Postal Address
                            </td>
                            <td>
                                <asp:TextBox ID="txtPostalAddress" runat="server" MaxLength="255" ReadOnly="True"
                                    Rows="3" TextMode="MultiLine" Width="300px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Residential Address
                            </td>
                            <td>
                                <asp:TextBox ID="txtResidentialAddress" runat="server" Enabled="False" MaxLength="255"
                                    Rows="3" TextMode="MultiLine" Width="300px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr id="trOffice" runat="server">
                            <td runat="server">
                                Office
                            </td>
                            <td runat="server">
                                <asp:TextBox ID="txtOffice" runat="server" MaxLength="100" ReadOnly="True" Width="300px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr id="trDepartment" runat="server">
                            <td runat="server">
                                Department
                            </td>
                            <td runat="server">
                                <asp:TextBox ID="txtDepartment" runat="server" MaxLength="200" ReadOnly="True" Width="300px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr id="trPosition" runat="server">
                            <td runat="server">
                                Position
                            </td>
                            <td runat="server">
                                <asp:TextBox ID="txtPositionHeld" runat="server" MaxLength="200" ReadOnly="True"
                                    Width="300px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Email
                            </td>
                            <td>
                                <asp:TextBox ID="txtEmail" runat="server" MaxLength="100" ReadOnly="True" Width="300px"></asp:TextBox><asp:RequiredFieldValidator
                                    ID="reqvalEmail" runat="server" ControlToValidate="txtEmail" Display="Dynamic"
                                    ErrorMessage="* Required" ValidationGroup="popup22"></asp:RequiredFieldValidator>&nbsp;<asp:RegularExpressionValidator
                                        ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtEmail"
                                        Display="Dynamic" ErrorMessage="Please enter a valid email address" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                                        ValidationGroup="popup22"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Work Telephone
                            </td>
                            <td>
                                <asp:TextBox ID="txtTelWork" runat="server" MaxLength="50" ReadOnly="True" Width="150px"></asp:TextBox>&nbsp;(e.g.0317001122)
                                <asp:RequiredFieldValidator ID="reqValTelWork" runat="server" ControlToValidate="txtTelWork"
                                    Display="Dynamic" ErrorMessage="* Required" ValidationGroup="popup22"></asp:RequiredFieldValidator>&nbsp;<asp:RegularExpressionValidator
                                        ID="regTelWork" runat="server" ControlToValidate="txtTelWork" Display="Dynamic"
                                        ErrorMessage="Please enter a valid telephone no." ValidationExpression="\d{10}|\d{13}"
                                        ValidationGroup="popup22"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Cellphone
                            </td>
                            <td>
                                <asp:TextBox ID="txtTelCell" runat="server" MaxLength="50" ReadOnly="True" Width="150px"></asp:TextBox>&nbsp;(e.g.0821231234)
                                <asp:RegularExpressionValidator ID="regTelCell" runat="server" ControlToValidate="txtTelCell"
                                    Display="Dynamic" ErrorMessage="Please enter a valid cellphone no." ValidationExpression="\d{10}|\d{13}"
                                    ValidationGroup="popup22"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Fax
                            </td>
                            <td>
                                <asp:TextBox ID="txtFax" runat="server" MaxLength="50" ReadOnly="True" Width="150px"></asp:TextBox>&nbsp;(e.g.0317001123)
                                <asp:RegularExpressionValidator ID="regFax" runat="server" ControlToValidate="txtFax"
                                    Display="Dynamic" ErrorMessage="Please enter a valid fax no." ValidationExpression="\d{10}|\d{13}"
                                    ValidationGroup="popup22"></asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Ethnic Origin
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlEthnicOriginID" runat="server" Enabled="False">
                                </asp:DropDownList>
                                &nbsp;&nbsp;&nbsp;&nbsp;Gender&nbsp;
                                <asp:DropDownList ID="ddlGenderID" runat="server" Enabled="False">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Historically Disadvantaged
                            </td>
                            <td>
                                <asp:CheckBox ID="chkIsHistoricallyDisadvantaged" runat="server"></asp:CheckBox>&nbsp;&nbsp;&nbsp;&nbsp;Disabled&nbsp;
                                <asp:CheckBox ID="chkIsDisabled" runat="server"></asp:CheckBox>
                            </td>
                        </tr>
                        <tr id="trDietaryRequirements" runat="server">
                            <td runat="server">
                                &nbsp;</td>
                            <td runat="server">
                                &nbsp;</td>
                        </tr>
                        <tr id="trSaveButton" runat="server">
                            <td align="center" colspan="2" runat="server">
                                <asp:Button ID="btnSave" runat="server" OnClick="btnSave_Click" Text="Save" ValidationGroup="popup22" />
                                <uc1:LabelWithTimedMsg ID="lblSaveMessage" runat="server"></uc1:LabelWithTimedMsg>
                            </td>
                        </tr>
                        <tr id="trModif" runat="server">
                            <td colspan="2" runat="server">
                                Modified By&nbsp;
                                <asp:TextBox ID="txtUserNameModifiedBy" runat="server" BackColor="#E0E0E0" BorderStyle="None"
                                    MaxLength="4" ReadOnly="True" Width="137px"></asp:TextBox>On
                                <asp:TextBox ID="txtRecordDate" runat="server" BackColor="#E0E0E0" BorderStyle="None"
                                    MaxLength="10" ReadOnly="True" Width="62px"></asp:TextBox>&nbsp;
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </ContentTemplate>
        </ajaxToolkit:TabPanel>
        <ajaxToolkit:TabPanel ID="TabPanel2" runat="server" HeaderText="Companies" SkinID="PopupPanel">
            <ContentTemplate>
                <asp:Panel ID="pnlCompanies" runat="server">
                    <table border="0" cellpadding="0" cellspacing="0" width="150px">
                        <tr>
                            <td>
                                <strong>Is part of</strong>
                            </td>
                            <td align="right" colspan="2">
                                &nbsp;<asp:Panel ID="pnlSearch" runat="server" DefaultButton="btnGo">
                                    Search for company to add&nbsp;<asp:TextBox ID="txtCompanyNameSearch" runat="server"
                                        Width="70px"></asp:TextBox><asp:Button ID="btnGo" runat="server" OnClick="btnGo_Click"
                                            Text="Go" Width="30px" />&nbsp;</asp:Panel>
                            </td>
                        </tr>
                        <tr>
                            <td valign="top">
                                <asp:ListBox ID="lstYes" runat="server" BackColor="Transparent" Height="260px" SelectionMode="Multiple"
                                    Width="270px"></asp:ListBox>
                            </td>
                            <td valign="top">
                                <p>
                                    <asp:Button ID="btnAdd" runat="server" BorderStyle="None" Height="1cm" OnClick="btnAdd_Click"
                                        Text="&lt;&lt; Add" Width="90px" CausesValidation="False"></asp:Button></p>
                                <p>
                                    &nbsp;</p>
                                <p>
                                    <asp:Button ID="btnRemove" runat="server" BorderStyle="None" Height="1cm" OnClick="btnRemove_Click"
                                        Text="Remove &gt;&gt;" Width="90px" CausesValidation="False"></asp:Button></p>
                            </td>
                            <td valign="top">
                                &nbsp;<asp:ListBox ID="lstNo" runat="server" BackColor="Transparent" Height="260px"
                                    SelectionMode="Multiple" Width="270px"></asp:ListBox>
                            </td>
                            <td>
                                <img id="spcr" height="100px" src="App_Themes/Default/Images/spacer.gif" width="1px"
                                    alt="spacer" />
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </ContentTemplate>
        </ajaxToolkit:TabPanel>
    </asp:TabContainer>
</asp:Panel>
